home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 1 / MacMania 1.toast / Educational / Education'More / M-Q / Math.cpt / Math / card_6699.txt < prev    next >
Text File  |  1990-12-18  |  5KB  |  235 lines

  1. -- card: 6699 from stack: in
  2. -- bmap block id: 6971
  3. -- flags: 0000
  4. -- background id: 2700
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on opencard
  8.   global right, wrong
  9.   put 0 into right
  10.   put right into  field numright
  11.  
  12.   put 0 into wrong
  13.   put wrong into  field numwrong
  14.   click at loc of card field result
  15. end opencard
  16.  
  17.  
  18.  
  19.  
  20.  
  21. -- part 1 (field)
  22. -- low flags: 00
  23. -- high flags: 0000
  24. -- rect: left=188 top=121 right=151 bottom=231
  25. -- title width / last selected line: 0
  26. -- icon id / first selected line: 0 / 0
  27. -- text alignment: 65535
  28. -- font id: 3
  29. -- text size: 24
  30. -- style flags: 256
  31. -- line height: 32
  32. -- part name: second
  33.  
  34.  
  35. -- part 2 (field)
  36. -- low flags: 00
  37. -- high flags: 0002
  38. -- rect: left=255 top=82 right=112 bottom=301
  39. -- title width / last selected line: 0
  40. -- icon id / first selected line: 0 / 0
  41. -- text alignment: 0
  42. -- font id: 3
  43. -- text size: 24
  44. -- style flags: 256
  45. -- line height: 32
  46. -- part name: result
  47. ----- HyperTalk script -----
  48.  
  49. on returnInField
  50.  
  51.   if card field result < 10 then
  52.     click at loc of card field step1
  53.   end if
  54.   if  card field result > 10 then
  55.     click at loc of card field step3
  56.   end if
  57. end returnInField
  58.  
  59.  
  60.  
  61. on enterInfield
  62.   global right,wrong
  63.  
  64.   put "" into card field step1
  65.  
  66.   put "" into card field step2
  67.   put "" into card field step3
  68.  
  69.   if card field result <> (card field first)/(card field second) then
  70.     put "Try again" into card field feedback
  71.     talk card field feedback ,150,150
  72.     put "" into card field result
  73.     put wrong +1 into wrong
  74.     put wrong into field numwrong
  75.   end if
  76.   if card field result = (card field first)/(card field second) then
  77.     put right +1 into right
  78.     put right into field numright
  79.     put "Right" into card field feedback
  80.     talk card field feedback,150,150
  81.  
  82.     put round of random of 99 into card field second
  83.  
  84.     put (round of random of 99)*card field second  into card field first
  85.     talk card field first,150,150
  86.     talk "divided by",150,150
  87.     talk card field second,150,150
  88.     put "" into card field result
  89.  
  90.   end if
  91.  
  92.   put "" into card field feedback
  93.   click at the loc of card field result
  94.   talk "when the answer is right, press enter",150,150
  95. end enterInfield
  96.  
  97.  
  98.  
  99. -- part 4 (field)
  100. -- low flags: 00
  101. -- high flags: 0000
  102. -- rect: left=241 top=121 right=151 bottom=318
  103. -- title width / last selected line: 0
  104. -- icon id / first selected line: 0 / 0
  105. -- text alignment: 0
  106. -- font id: 3
  107. -- text size: 24
  108. -- style flags: 256
  109. -- line height: 32
  110. -- part name: first
  111.  
  112.  
  113. -- part 5 (field)
  114. -- low flags: 01
  115. -- high flags: 0000
  116. -- rect: left=341 top=123 right=149 bottom=463
  117. -- title width / last selected line: 0
  118. -- icon id / first selected line: 0 / 0
  119. -- text alignment: 0
  120. -- font id: 3
  121. -- text size: 18
  122. -- style flags: 256
  123. -- line height: 24
  124. -- part name: feedback
  125.  
  126.  
  127. -- part 11 (field)
  128. -- low flags: 00
  129. -- high flags: 0002
  130. -- rect: left=241 top=153 right=183 bottom=319
  131. -- title width / last selected line: 0
  132. -- icon id / first selected line: 0 / 0
  133. -- text alignment: 0
  134. -- font id: 3
  135. -- text size: 24
  136. -- style flags: 256
  137. -- line height: 32
  138. -- part name: step1
  139. ----- HyperTalk script -----
  140. on returnInfield
  141.   click at loc of card field step2
  142.   if card field first/card field second <= 9 then
  143.     click at loc of card field result
  144.   end if
  145.  
  146.  
  147. end returnInfield
  148.  
  149.  
  150.  
  151.  
  152. -- part 12 (field)
  153. -- low flags: 00
  154. -- high flags: 0002
  155. -- rect: left=259 top=192 right=222 bottom=336
  156. -- title width / last selected line: 0
  157. -- icon id / first selected line: 0 / 0
  158. -- text alignment: 0
  159. -- font id: 3
  160. -- text size: 24
  161. -- style flags: 256
  162. -- line height: 32
  163. -- part name: step2
  164. ----- HyperTalk script -----
  165. on returnInfield
  166.   click at loc of card field result
  167. end returnInfield
  168.  
  169.  
  170.  
  171. -- part 14 (field)
  172. -- low flags: 00
  173. -- high flags: 0002
  174. -- rect: left=260 top=228 right=257 bottom=336
  175. -- title width / last selected line: 0
  176. -- icon id / first selected line: 0 / 0
  177. -- text alignment: 0
  178. -- font id: 3
  179. -- text size: 24
  180. -- style flags: 256
  181. -- line height: 32
  182. -- part name: step3
  183. ----- HyperTalk script -----
  184. on returnInfield
  185.   click at loc of card field result
  186. end returnInfield
  187.  
  188.  
  189.  
  190. -- part 15 (field)
  191. -- low flags: 01
  192. -- high flags: 0000
  193. -- rect: left=313 top=80 right=114 bottom=437
  194. -- title width / last selected line: 0
  195. -- icon id / first selected line: 0 / 0
  196. -- text alignment: 0
  197. -- font id: 3
  198. -- text size: 12
  199. -- style flags: 0
  200. -- line height: 16
  201. -- part name: 
  202.  
  203.  
  204. -- part contents for background part 6
  205. ----- text -----
  206. test
  207.  
  208. -- part contents for card part 1
  209. ----- text -----
  210. 28
  211.  
  212. -- part contents for card part 9
  213. ----- text -----
  214. 0
  215.  
  216. -- part contents for card part 10
  217. ----- text -----
  218. 0
  219.  
  220. -- part contents for background part 22
  221. ----- text -----
  222. 0
  223.  
  224. -- part contents for background part 23
  225. ----- text -----
  226. 0
  227.  
  228. -- part contents for card part 4
  229. ----- text -----
  230. 2492
  231.  
  232. -- part contents for card part 15
  233. ----- text -----
  234. Type enter for the
  235. right answer!